import request from '@/utils/request'

export default{

    
    //查询分页
    getPageList(pageQuery) {

        return request({

            url: `/crmservice/banner/getBannerPage`,
            method: 'post',
            //pageQuery条件对象，后端使用RequestBody获取数据
            //data表示把对象转换json进行传递到接口里面
            data: pageQuery


        })
    },

    //删除
    deleteById(id) {

        return request({


            url: `/crmservice/banner/deleteBanner?id=${id}`,
            method: 'get',


        })

    },


    //添加
    addBanner(crmBanner) {
        return request({
            url: `/crmservice/banner/addBanner`,
            method: "post",
            data: crmBanner
        })
    },


    //根据id查询
    getBannerById(id) {

        return request({
            url: `/crmservice/banner/getBannerDetail?id=${id}`,
            method: "get",



        })
    },

    //修改方法
    updateBanner(crmBanner) {

        return request({

            url: `/crmservice/banner/updateBanner`,
            method: "post",
            data: crmBanner
        })

    }

}